<!doctype html>
<html class="no-js">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>糖半甜收银系统</title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>
  <link rel="icon" type="image/png" href="i/favicon.png">
  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">

  <link rel="stylesheet" href="__TMPL__/public/shop/css/amazeui.css">
  <link rel="stylesheet" href="__TMPL__/public/shop/css/app.css">
  <link rel="stylesheet" href="__TMPL__/public/shop/css/index.css" />
  <style>
		.alert { display: none; position: fixed; top: 3%; left: 50%; min-width: 200px; margin-left: -100px; z-index: 99999; padding: 15px; border: 1px solid transparent; border-radius: 4px;}
		.alert-success { color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6;}
		.am-right-slider {
			bottom: 0;
			position: fixed;
			left: 40%;
		}
		.dt-h{
			height: 45px;
		}
		.left-w{
			width: 100%;
			margin-bottom: 10px;
		}
		.flo-l{
			float: left;
		}
		.flo-r{
			float: right;
		}
		.font-z{
			font-size: 2rem;
		}
		.am-input-group-label{
			width:30% !important;
			padding:0 !important;
		}
  </style>
</head>
<body onload="javascript:return require();">
<div class="alert"></div>
	<div class="am-left-main">
		<ul class="am-tab-bar am-avg-md-2 am-avg-lg-2 am-bg-default am-text-white am-padding-left-sm am-padding-right-sm" style="padding-top:0.4rem;">
			<li>上一单</li>
			<li class="am-text-xs am-text-right orderid"><input class="am-text-right" type="text"  value="" style="background: transparent;border:none;"><input type="hidden" id="orderid" value=""></li>
			<!--<li class="am-text-xs am-text-right">应收：<em>0.00</em></li>
			<li class="am-text-xs am-text-right">实收：<em>0.00</em></li>
			<li class="am-text-xs am-text-right">找零：<em>0.00</em></li>-->
		</ul>
		<div class="am-bg-white">
			<div class="am-top-head am-padding-top-sm">
				<div class="am-g">
					<!--<div class="am-u-md-6 am-u-lg-6 am-text-center">
						<div class="am-uba am-border am-text-blue am-padding-top-xs am-padding-bottom-xs" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0}"><em class="am-icon-user am-padding-right-xs"></em>选择营业员</div>
					</div>-->
					<div class="am-u-md-6 am-u-lg-6 am-text-center" id="am-u-lg-6">
						<div class="am-uba am-border am-text-blue am-padding-top-xs am-padding-bottom-xs" data-am-offcanvas="{target: '#doc-oc-demo3'}"><em class="am-icon-user am-padding-right-xs"></em>选择会员</div>
					</div>
				</div>
				<div class="am-padding-top-sm am-padding-right am-padding-bottom-sm am-padding-left ">
			    <!--<div class="am-input-group">
			      <input type="text" class="am-form-field" placeholder="请输入货号/自编码/大写拼音码">
			      <span class="am-input-group-btn">
			        <button class="am-btn" type="button"><span class="am-icon-search"></span> </button>
			      </span>
				  </div>-->
				</div>
			</div>
			<div class="am-padding-sm am-padding-left-0 am-padding-bottom-0">
				<!--当商品列表为空时放开注释-->
				<!--<div class="goods-area">请点击右边的商品或扫描商品条形码</div>-->
				<!--<div class="goods-list am-margin-bottom " id="cart">-->
				<div id="cart" class="am-margin-bottom">

				</div>
			</div>
			<div class="am-jiesuan-panel">
				<div class="am-g">
					<div class="am-u-md-6 am-u-lg-6">
						<div class="am-btn am-btn-zdqu" id="clear"><i class="am-icon-cog am-padding-right-xs"></i>整单取消</div>
						<div class="am-btn am-btn-qd" id="puorders"><i class="am-icon-file am-padding-right-xs"></i>取单</div>
					</div>
				<!--	<div class="am-u-md-6 am-u-lg-6 am-text-right">
						<div class="am-inline-block am-radius am-btn1 am-margin-right-sm"><i class="am-icon-chevron-up"></i></div>
						<div class="am-inline-block am-radius am-btn1"><i class="am-icon-chevron-down"></i></div>
					</div>-->
				</div>
				<div class="am-margin-top-xs am-padding-left am-padding-right">
					<div class="am-g" style="border-top: 1px solid #DDDDDD;">
						<div class="am-u-md-6 am-u-lg-6 am-text-lg am-padding-top-xs">
							<span>合计：</span>
							<span class="am-padding-left-sm num" style="color:#CCCCCC;">0件</span>
						</div>
						<input type="hidden" id="vip" value="">
						<input type="hidden" id='update' value="">
						<div class="am-u-md-6 am-u-lg-6 am-text-right am-text-danger am-bold">￥<em class="am-text-xl am-padding-left-sm all">0.00</em></div>
					</div>
				</div>
			</div>
		</div>
		<div class="am-g am-margin-top-sm am-fk-btn-group">
			<div id="puorder" class="am-u-md-4 am-u-lg-6 am-text-center am-btn am-btn2 radius-tl radius-bl"><i class="am-icon-cog am-padding-right-xs"></i>挂单</div>
			<!-- <div class="am-u-md-4 am-u-lg-4 am-text-center am-btn am-btn3" data-am-modal="{target: '#doc-modal-2', closeViaDimmer: 0}">自定义付款</div> -->
			<div class="am-u-md-4 am-u-lg-6 am-text-center am-btn am-btn-success radius-tr radius-br" onclick="javascript:jiezhang()">结算</div>
		</div>
	</div>
	<div class="am-right-main">
		<div id="am-tab-nav" class="am-bg-white am-padding-left-sm am-padding-right-sm am-g">
			<span class="am-u-md-1 am-u-lg-1 am-padding-top-sm am-padding-right-0 am-padding-bottom-sm"><em class="am-icon-chevron-left am-text-lg"></em></span>
			<div class="am-u-md-10 am-u-lg-10 am-padding-left-0 am-padding-right-0" style="padding-top:0.3rem;">
				<ul class="am-avg-md-5 am-avg-lg-5 am-tabs-nav">
					<li  class="am-active "><a class="category am-actives"><input type="hidden" value=""> 全部</a></li>
					<foreach name="category" item="category">
						<li class="am-active"><a class="category"><input type="hidden" value="{$category.id}">{$category.classify_name}</a></li>
					</foreach>
					<li class="am-active"><a class="category"><input type="hidden" value="taocan">套餐</a></li>
				</ul>
				</ul>
			</div>
			<span class="am-u-md-1 am-u-lg-1 am-padding-top-sm am-padding-bottom-sm am-padding-left am-text-right"><em class="am-icon-chevron-right am-text-lg"></em></span>
		</div>
		<div id="tabContainer"  class="am-margin-top-sm">
			<ul class="am-avg-md-3 am-avg-lg-5 am-thumbnails show ">
				<foreach name="data" item="data">
				<li class="adds">
					<div class="am-bg-white am-padding-sm">
						<p class="goods-title am-margin-0 am-padding-bottom-sm am-text-default">{$data.g_goodsname}({$data.g_format})</p>
						<!--<p class="am-margin-top-0 am-margin-bottom-xl am-link-muted">{$data.g_id}</p>-->
						<div class="am-text-right am-bold am-text-lg">折扣：{$data.plan}</div>
						<div class="am-text-right am-bold am-text-lg">￥{$data.g_price}</div>
						<input type="hidden" class="goods_id" value="{$data.g_id}">
						<input type="hidden" class="stemeal" value="{$data.stemeal}">
					</div>
				</li>
				</foreach>
			</ul>
		</div>
	</div>
	<div class="clear"></div>
	<!--选择营业员-->
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-1">
	  <div class="am-modal-dialog">
	    <div class="am-modal-hd am-margin-bottom-sm">请选择营业员
	      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
	    </div>
	    <div class="am-modal-bd">
	      <form class="am-form am-form-horizontal">
	      	<div class="am-form-group input_box">
	      		<label class="am-u-sm-3 am-form-label">营业员</label>
						<div class="am-u-sm-9 ">
				      <input type="text" class="am-text-right" placeholder="请输入营业员编号">
				    </div>
	      	</div>
	      	<div class="am-form-group">
	      		<ul class="am-avg-md-4 am-avg-lg-4 am-thumbnails">
						  <li><div class="am-padding-top-sm am-padding-bottom-sm am-radius" style="border: 1px solid #ddd;">无</div></li>
						  <li><div class="am-padding-top-sm am-padding-bottom-sm am-radius" style="border: 1px solid #ddd;">冯</li>
						</ul>
	      	</div>
	      </form>
	    </div>
	  </div>
	</div>
		
	<!--自定义付款-->
	<div class="am-modal am-modal-no-btn" tabindex="-1" id="doc-modal-2">
	  <div class="am-modal-dialog">
	    <div class="am-modal-hd am-margin-bottom-sm">请选择一种快捷支付方式
	      <a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close>&times;</a>
	    </div>
	    <div class="am-modal-bd">
	      <ul class="am-list am-avg-sm-3 am-avg-md-3 am-avg-lg-3 am-thumbnails">
				  <li>
				    <div>
				    	<img class="am-thumbnail" src="__TMPL__/public/shop/img/yl.png">
				    	<label>思迅Pay</label>
				    </div>
				  </li>
				  <li>
				    <div>
				    	<img class="am-thumbnail" src="__TMPL__/public/shop/img/yl.png">
				    	<label>思迅Pay</label>
				    </div>
				  </li>
				  <li>
				    <div>
				    	<img class="am-thumbnail" src="__TMPL__/public/shop/img/yl.png">
				    	<label>思迅Pay</label>
				    </div>
				  </li>
				  <li>
				    <div>
				    	<img class="am-thumbnail" src="__TMPL__/public/shop/img/yl.png">
				    	<label>思迅Pay</label>
				    </div>
				  </li>
				</ul>
	    </div>
	  </div>
	</div>

	<!--侧边栏-->
<div id="doc-oc-demo3" class="am-offcanvas">
  <div class="am-offcanvas-bar am-offcanvas-bar-flip">
    <div class="am-offcanvas-content">
      <header data-am-widget="header" class="am-header am-header-default">
      	<div class="am-header-left am-header-nav">
          <a href="#left-link" class="">返回</a>
      	</div>
      	<h1 class="am-header-title">
          <a href="#title-link" class="">会员搜索</a>
      	</h1>
      	<div class="am-header-right am-header-nav">
          <a href="#right-link" class="" onclick="memadd()">新增会员</a>
      	</div>
  		</header>
  		<div class="am-margin-top-xl">
  			<form class="am-form">
				<div class="am-form-group">
					<span style="margin-right: 5%">会员卡</span><input type="radio"   class="am-input-lg am-radius" name="account" value="cord" checked="checked">
					<span style="margin-right: 5%;margin-left: 5%">手机号</span><input  type="radio"   class="am-input-lg am-radius" name="account" value="phone">
				</div>
  				<div class="am-form-group">
  					<input type="text" class="am-input-lg am-radius" id="mobile" value="" />
  				</div>
  				<div class="am-form-group">
  					<input type="password" class="am-input-lg am-radius"  id="password" value="" placeholder="输入密码(没有密码可以不输入)" />
  				</div>
  				<div class="am-form-group">
  					<div class="am-u-md-6 am-u-lg-6">
  						<div class="am-btn-primary am-text-center"><input type="button" class="am-btn am-btn-primary" value="查看详情" onclick="mempay()"></div>
  					</div>
  					<div class="am-u-md-6 am-u-lg-6">
  						<div class="am-btn-default am-text-center"><input type="button" class="am-btn am-btn-default sub" value="登录"></div>
  					</div>
  				</div>
  			</form>
  		</div>
    </div>
  </div>
</div>		
<!--[if (gte IE 9)|!(IE)]><!-->
<script src="__TMPL__/public/shop/js/jquery.min.js"></script>
	<script src="__STATIC__/js/layer/layer.js"></script>
	<script src="__TMPL__/public/shop/js/order.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="__TMPL__/public/shop/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script src="__TMPL__/public/shop/js/amazeui.min.js"></script>
</body>
</html>
<script>
    $(function(){
        var iframe_H = $('#mian_frame', window.parent.document).height(),
            tab_bar_H = $('.am-left-main .am-tab-bar').outerHeight(),
            top_head_H = $('.am-left-main .am-top-head').outerHeight(),
            jiesuan_panel_H = $('.am-jiesuan-panel').outerHeight(),
            fu_btns_H = $('.am-fk-btn-group').outerHeight();
        var goos_list_H = iframe_H - tab_bar_H - top_head_H - jiesuan_panel_H - fu_btns_H;
        var tabContainer_H = iframe_H - $('.r-footer').outerHeight() - $('#am-tab-nav').outerHeight() - 20;
        $('#cart').height(goos_list_H-43);
        $('#tabContainer').height(tabContainer_H);

        $('.am-input-group-label').click(function(){
            alert("数量");
        })
    })
    /*
   * 商品选择
   * */
    $(".category").click(function(){
        var  id=$(this).children('input').val();
        $('.am-tabs-nav li a').removeClass('am-actives');
        $(this).addClass('am-actives');
        $.post('{:url("menu/show")}',{id:id},function (data) {
            var data=data.msg;
            var src = '';
            if(data != '')
            {
                $.each(data, function (k, val) {
                    src +='<li class="adds">'+
						'<div class="am-bg-white am-padding-sm">' +
                        '<p class="goods-title am-margin-0 am-padding-bottom-sm am-text-default">'+
                        val.g_goodsname+
                        '('+
						val.g_format+
						')'+
                        '</p>'+
						'<div class="am-text-right am-bold am-text-lg">折扣：'+
						val.plan+
						'</div>'+
						'<div class="am-text-right am-bold am-text-lg">￥'+
						val.g_price+
						'</div>'+
						'<input type="hidden" class="goods_id" value="'+
						val.g_id+
						'">'+
						'<input type="hidden" class="stemeal" value="'+
						val.stemeal+
						'">'+
						'</div>'+
						'</li>'
                    $('.show').html(src);
                })
            }else{
                $('.show').html(src);
            }
        },'json')
    });
    function jiezhang(){
        layer.open({
            type: 2,
            title: '订单结算',
            shadeClose: false,
            shade: false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content: "{:url('orderpay/paytype')}"//视图路径
        })
    }
    $(document).ready(function () {
        $(document).keydown('keyup',function (event) {
            if (event.keyCode == 13) {
                jiezhang();
            }
        });
    })
    //消息提示
  /*  function require() {
        $.post("{:url('Message/getMessage')}",null,function(data) {
            // 如果获得的数据不为空，则显示提醒
            if ($.trim(data) != null) {
                var date = data.msg;
                if(date != null){
                    var content = date.m_content;
                    // 这里写提醒的方式
                    $('.alert').appendTo('body').addClass('alert alert-success').html(content).show().delay(1500).fadeOut();
				}
            }
        });
        // 每三秒请求一次
        setTimeout('require()',3000);
    }*/
</script>
<script>
    /*
    * 会员认证
    * */
    $('.sub').click(function(){
        var mobile=$('#mobile').val();
        var password=$('#password').val();
        var type=$("input[name='account']:checked ").val();
        if(mobile == '')
        {
            alert('请填写卡号');
            return false;
        }
        if(password == '')
        {
            alert('请填写密码');
            return false;
        }
        $.post("{:url('Memberlogin/dologin')}",{mobile:mobile,password:password,type:type},function(date){
            alert(date.msg);
        },'json');
    })
	/*
	* 会员添加
	* */
    function memadd(){
        layer.open({
            type: 2,
            title: '会员添加',
            shadeClose: true,
            shade: false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content: '../member/memadd'//视图路径
        });
    }
    function memlogin(){
        layer.open({
            type:2,
            title:'会员管理',
            shadeClose:true,
            shade:false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content:'/home/Member/index'
        });
    }
    function mempay(){
        layer.open({
            type: 2,
            title: '会员信息',
            shadeClose: true,
            shade: false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content: '../member/findmem'//视图路径
        });
    }
</script>
<script>
    function zhuxiao(){
        window.location.href='../passwork/cancel';
    }
    function passwork(){
        layer.open({
            type: 2,
            title: '交接对账',
            shadeClose: true,
            shade: false,
            maxmin: false, //开启最大化最小化按钮
            area: ['100%', '100%'],
            content: '../passwork/index'//视图路径
        });
    }
</script>
